//
//  DBHelper.h
//  OrderManager
//
//  Created by System Administrator on 2009/3/2.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//
// 資料庫輔助物件 

#import <sqlite3.h>
//#define DATABASE_FULLNAME @"data.sqlite3"


@interface DBHelper : NSObject{
	sqlite3 *database;  
	NSString *databasePath;
	NSString *afullname;

}

@property(nonatomic,readonly) sqlite3 *database;
@property(nonatomic,retain) NSString *databasePath;
@property(nonatomic,retain) NSString *afullname;

// 取得資料庫輔助物件的 singleton
+ (DBHelper *) newInstance:(NSString *)name andEXT:(NSString *)ext andfullname:(NSString *)fullname;

// 開啓資料庫
- (sqlite3 *) openDatabase;

// 關閉資料庫
- (void) closeDatabase;

// 資料總數
- (int) countForSQL:(const char *) sql;

// 傳回完整路境
- (NSString *) fullPath;

@end
